{% extends 'layout/base.html' %}
{% load netease %}
{% load profile %}
{% load static %}

{% block css %}
    <link rel="stylesheet" href="{% static 'plugin/editor-md/css/editormd.preview.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/blog/home.css' %}">
{% endblock css %}

{% block js %}
    {#    markdown必备js#}
    {# Markdown显示必用插件 #}
    <script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/editor-md/1.5.0/editormd.js"
            type="application/javascript"></script>
    <script>window.jQuery || document.write('<script src="{% static 'plugin/editor-md/editormd.js' %}" type="text/javascript"><\/script>')</script>
    {#    <script src="{% static 'plugin/editor-md/editormd.js' %}"></script>#}

    <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/marked/0.3.3/marked.min.js"
            type="application/javascript"></script>
    <script>window.jQuery || document.write('<script src="{% static 'plugin/editor-md/lib/marked.min.js' %}" type="text/javascript"><\/script>')</script>
    {#    <script src="{% static 'plugin/editor-md/lib/marked.min.js' %}"></script>#}

    <script src="{% static 'plugin/editor-md/lib/prettify.min.js' %}"></script>

    <script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/raphael/2.1.3/raphael-min.js"
            type="application/javascript"></script>
    <script>window.jQuery || document.write('<script src="{% static 'plugin/editor-md/lib/raphael.min.js' %}" type="text/javascript"><\/script>')</script>
    {#    <script src="{% static 'plugin/editor-md/lib/raphael.min.js' %}"></script>#}

    <script src="{% static 'plugin/editor-md/lib/underscore.min.js' %}"></script>

    <script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/js-sequence-diagrams/1.0.4/sequence-diagram-min.js"
            type="application/javascript"></script>
    <script>window.jQuery || document.write('<script src="{% static 'plugin/editor-md/lib/sequence-diagram.min.js' %}" type="text/javascript"><\/script>')</script>
    {#    <script src="{% static 'plugin/editor-md/lib/sequence-diagram.min.js' %}"></script>#}

    <script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/flowchart/1.3.4/flowchart.min.js"
            type="application/javascript"></script>
    <script>window.jQuery || document.write('<script src="{% static 'plugin/editor-md/lib/flowchart.min.js' %}" type="text/javascript"><\/script>')</script>
    {#    <script src="{% static 'plugin/editor-md/lib/flowchart.min.js' %}"></script>#}

    <script src="{% static 'plugin/editor-md/lib/jquery.flowchart.min.js' %}"></script>

    <script src="{% static 'js/blog/home.js' %}"></script>
{% endblock js %}

{% block title %}首页{% endblock title %}


{% block content %}
    <div class="row" style="margin-bottom: 100px">
        <div class="col-md-3 col-sm-4 hidden-xs left">
            {#            个人简介#}
            <table class="table">
                <tr>
                    <a href="{% url 'blog:profile' %}">
                        <img style="height: 254px;
                                width: 254px;
                                margin-top: 10px;
                                margin-bottom: 45px;
                                border-radius: 50%;"
                             src="{{ user.image }}" alt="头像"/>
                    </a>
                </tr>
                <tr>
                    <th>{{ user.username|title }}</th>
                </tr>
                <tr>
                    <th>邮箱：</th>
                    <th>{{ user.email }}</th>
                </tr>
            </table>
{#            {% netease_music request %}#}
        </div>
        <div class="col-md-9 col-sm-8 right">
            <!--博客更新处-->
            <div class="page-header">
                <h3 style="margin: 40px 15px 20px;">最近更新 <small>博客文章</small></h3>

            </div>
            {% for note in notes %}
                <div class="col-sm-6 col-xs-12 update-blog">
                    {#                        文章博客#}

                    <div class="panel panel-default">
                        <div class="panel-heading title" fid="{{ note.id }}">
                            <h3 class="panel-title"><a
                                    href="{% url 'blog:article' note.id %}">{{ note.title }}</a></h3>
                            <br/>
                            <div>{{ note.create_datetime|date:"Y-m-d" }}</div>

                        </div>
                        <div class="panel-body" style="display: none" id="content_{{ note.id }}">
                            <div>
                                <textarea>{{ note.content }}</textarea>
                            </div>

                        </div>
                    </div>

                </div>
            {% endfor %}

            <!--更新记录-->

        </div>
    </div>


{% endblock content %}